<%@ page language="java" import="java.util.*, com.rmt.www.vo.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
 
	<link href="css/Site.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" language="javascript" src="js/jquery-1.7.1.js"></script>
	<script  type="text/javascript">
	 $(document).ready(function(){
		 $(".content").hide();
		 $(".little_title").click(function(event){
    	 var children=$(this).siblings(".content");
    	 children.each(function(){
    		 $(this).toggle("slow");
    	 });
     });
     });
     

	</script>
  </head>
  
  <body>
  <div class='page' id='wrap'>
  <div id="header" style='background-color: #5c87b2'>
            <div id="title">
                <h1>&nbsp;&nbsp;RMT Service for administrator</h1>
            </div>
              
            <div id="logindisplay">
                welcome <%=((User)session.getAttribute("currentUser")).getName()%>,  <a href='../RMT'>logout</a>
            </div> 
            
            <br/>
            <div id="menucontainer">
                <ul id="menu">
                	<li><a href="adminHomeAction">Home</a></li>              
                    <li><a href='getProjectsForAdmin'>Projects</a></li>
                    <li><a href='accountManageAction'>Users</a></li>
                </ul>
            </div>
        </div>
   
	<div id='main'>
	<h1>Manage total <s:property value='projectList.size()'/> projects</h1>
	<hr/>
	<hr/>
		<s:iterator value="projectList" id="list" status="st">
			<div id="section">
				<div class="little_title" style="cursor:pointer">
					<font style="font-size:25px; color:#000000"><b><s:property value='#list.title'/></b></font>&nbsp;&nbsp;&nbsp;
					<s:if test='#list._hasrequest'>
						<a href='changeControlAction?pid=<s:property value="#list.pid"/>'>process request</a>
					</s:if>
					some other info
				</div>
				<div class="content">
					<br/>
				<br/>
				<table style='border: hidden'>
					<tr style='border: hidden'>
						<th style='border: hidden'>features info:</th>
						<td style='border: hidden'>&nbsp;<b><s:property value="#list._artifactNumList.get(0)"/></b> features,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._requestNumList.get(0)"/></b> feature requests,</td>
						<td style='border: hidden'>&nbsp;&nbsp;total <b><s:property value="#list._effortNumList.get(0)"/></b> effort,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._priorityHighList.get(0)"/></b> high priority features</td>
					</tr>
					<tr style='border: hidden'>
						<th style='background-color: #ffffff'>requirements info</th>
						<td style='border: hidden'>&nbsp;<b><s:property value="#list._artifactNumList.get(1)"/></b> requirements,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._requestNumList.get(1)"/></b> requirement requests,</td>
						<td style='border: hidden'>&nbsp;&nbsp;total <b><s:property value="#list._effortNumList.get(1)"/></b> effort,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._priorityHighList.get(1)"/></b> high priority requirement</td>
					</tr>
					<tr style="border: hidden">
						<th>designs info</th>
						<td style='border: hidden'>&nbsp;<b><s:property value="#list._artifactNumList.get(2)"/></b> designs,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._requestNumList.get(2)"/></b> design requests,</td>
						<td style='border: hidden'>&nbsp;&nbsp;total <b><s:property value="#list._effortNumList.get(2)"/></b> effort,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._priorityHighList.get(2)"/></b> high priority designs</td>
					</tr>
					<tr style='border: hidden'>
						<th style='background-color: #ffffff; border:hidden;'>implementation info</th>
						<td style='border: hidden'>&nbsp;<b><s:property value="#list._artifactNumList.get(3)"/></b> implementations,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._requestNumList.get(3)"/></b> implementations requests,</td>
						<td style='border: hidden'>&nbsp;&nbsp;total <b><s:property value="#list._effortNumList.get(3)"/></b> effort,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._priorityHighList.get(3)"/></b> high priority implementations</td>
					</tr>
					<tr style='border: hidden'>
						<th style='border: hidden'>test cases info</th>
						<td style='border: hidden'>&nbsp;<b><s:property value="#list._artifactNumList.get(4)"/></b> test cases,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._requestNumList.get(4)"/></b> test case requests,</td>
						<td style='border: hidden'>&nbsp;&nbsp;total <b><s:property value="#list._effortNumList.get(4)"/></b> effort,</td>
						<td style='border: hidden'>&nbsp;&nbsp;<b><s:property value="#list._priorityHighList.get(4)"/></b> high priority test cases</td>
					</tr>
				</table>
				</div>
			</div>
			<hr/>
		</s:iterator>
	</div>
	 <div class="push"></div>
  	<div id="footer" style="background-color:#5c87b2;">
  	  <table width="100%" border="0" cellpadding="0" cellspacing="0" style="border:hidden;background-color:#5c87b2;">							
		<tbody style="border:hidden">
			<tr style="border: hidden">	
				<td width="160" style="border: hidden">&nbsp;</td>											   		<td>									
				<table width="60%" border="0" cellspacing="0" cellpadding="0" style="border:hidden;">	
					<tbody style="border: hidden">
						<tr style="border: hidden">
							<td height="20px"><font color='#ffffff'>©2012 Copyright NJU SEI RMT team</font></td>										
						</tr>										
						<tr style="border: hidden">											
							<td height="20px"><font color='#ffffff'>2012 graduation project: requirement management tool</font></td>	
						</tr>										
						<tr style="border: hidden">					
							<td height="20px"><font color='#ffffff'>project homepage：http://code.google.com/p/rmt-ss/</font></td>		
						</tr>									
					</tbody>
				</table>								
				</td>							
			</tr>						
		</tbody>
	</table>	
  	</div>
    </div>
  </body>
</html>
